﻿Namespace nHibernate.Models
    Public Class CompanySettingsModel

        Public Overridable Property CompanyName As String
        Public Overridable Property TaxID As String
        Public Overridable Property TradeID As String

        Public Overridable Property Street As String
        Public Overridable Property No As String
        Public Overridable Property Addition As String
        Public Overridable Property ZipCode As String
        Public Overridable Property City As String
        Public Overridable Property Country As String

        Public Overridable Property CompanyID As String
        Public Overridable Property IsIDNumeric As Boolean

        Public Overridable Function ToAddress() As Address
            Return New Address With {.Addition = Addition, .City = City, .Street = Street, .No = No, .ZipCode = ZipCode, .Country = Country}
        End Function

        Public Overridable Sub FromAddress(a As Address)
            Addition = a.Addition
            Street = a.Street
            No = a.No
            ZipCode = a.ZipCode
            City = a.City
            Country = a.Country
        End Sub
    End Class

End Namespace

